package it.unibo.refolding.common;

public interface Sleeper {

  public static final Sleeper SYSTEM_SLEEPER = new Sleeper() {
    @Override
    public void sleep(long millis, int nanos) throws InterruptedException {
      Thread.sleep(millis, nanos);
    }

    @Override
    public void sleep(long millis) throws InterruptedException {
      Thread.sleep(millis);
    }
  };

  public static final Sleeper INSOMNIAC = new Sleeper() {
    @Override
    public void sleep(long millis, int nanos) throws InterruptedException {
    }

    @Override
    public void sleep(long millis) throws InterruptedException {
    }
  };

  public void sleep(long millis, int nanos) throws InterruptedException;

  public void sleep(long millis) throws InterruptedException;
}
